Component({
  options: {
    addGlobalClass: true
  },
  properties: {
    value:{
      type:String,
      value:''
    }
  },
  data: {
    valueData:''
  },
  lifetimes: {
    attached: function () {
      this.setData({valueData: this.properties.value});
    }
  },
  methods: {
    bindInput(e) {
      this.setData({valueData:e.detail});
    },
    search(e) {
      let kw=this.properties.value;
      if(!kw)kw=this.data.valueData;
      this.triggerEvent('search',{kw:kw});
    }
  }
})
